<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>uni-app 开发指南</title>
    <link href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <link href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            min-height: 100vh;
        }
        
        .hero-gradient {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }
        
        .content-card {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            transition: all 0.3s ease;
        }
        
        .content-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
        }
        
        .section-title {
            position: relative;
            padding-left: 20px;
        }
        
        .section-title::before {
            content: '';
            position: absolute;
            left: 0;
            top: 50%;
            transform: translateY(-50%);
            width: 4px;
            height: 24px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 2px;
        }
        
        .code-block {
            background: #1e1e1e;
            color: #d4d4d4;
            border-radius: 8px;
            padding: 20px;
            overflow-x: auto;
            font-family: 'Consolas', 'Monaco', monospace;
            font-size: 14px;
            line-height: 1.6;
            position: relative;
        }
        
        .code-block::before {
            content: attr(data-language);
            position: absolute;
            top: 8px;
            right: 12px;
            font-size: 12px;
            color: #888;
            text-transform: uppercase;
        }
        
        .feature-card {
            background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
            color: white;
            padding: 30px;
            border-radius: 16px;
            transition: all 0.3s ease;
        }
        
        .feature-card:hover {
            transform: scale(1.05);
            box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
        }
        
        .timeline-item {
            position: relative;
            padding-left: 40px;
            margin-bottom: 30px;
        }
        
        .timeline-item::before {
            content: '';
            position: absolute;
            left: 10px;
            top: 8px;
            width: 12px;
            height: 12px;
            background: #667eea;
            border-radius: 50%;
            box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
        }
        
        .timeline-item::after {
            content: '';
            position: absolute;
            left: 15px;
            top: 20px;
            width: 2px;
            height: calc(100% + 10px);
            background: #e0e0e0;
        }
        
        .timeline-item:last-child::after {
            display: none;
        }
        
        .floating-icon {
            animation: float 3s ease-in-out infinite;
        }
        
        @keyframes float {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-10px); }
        }
        
        .gradient-text {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        
        .mermaid {
            display: flex;
            justify-content: center;
            margin: 30px 0;
        }
    </style>
</head>
<body>
    <!-- Hero Section -->
    <section class="hero-gradient text-white py-20">
        <div class="container mx-auto px-6">
            <div class="text-center">
                <h1 class="text-5xl md:text-6xl font-bold mb-6 animate-pulse">
                    <i class="fas fa-mobile-alt mr-4 floating-icon"></i>
                    uni-app 开发指南
                </h1>
                <p class="text-xl md:text-2xl mb-8 opacity-90">
                    一套代码，多端运行 - 开启跨平台开发新纪元
                </p>
                <div class="flex justify-center space-x-4">
                    <a href="https://uniapp.dcloud.io/" target="_blank" class="bg-white text-purple-700 px-8 py-3 rounded-full font-semibold hover:bg-opacity-90 transition">
                        <i class="fas fa-book mr-2"></i>官方文档
                    </a>
                    <a href="https://www.bilibili.com/video/BV17U4y1J7am/" target="_blank" class="bg-transparent border-2 border-white px-8 py-3 rounded-full font-semibold hover:bg-white hover:text-purple-700 transition">
                        <i class="fas fa-play-circle mr-2"></i>视频教程
                    </a>
                </div>
            </div>
        </div>
    </section>

    <!-- Main Content -->
    <div class="container mx-auto px-6 py-12">
        <!-- Introduction Section -->
        <div class="content-card rounded-2xl shadow-xl p-8 mb-12">
            <h2 class="text-3xl font-bold mb-6 gradient-text">
                <i class="fas fa-info-circle mr-3"></i>什么是 uni-app？
            </h2>
            <div class="grid md:grid-cols-2 gap-8">
                <div>
                    <p class="text-gray-700 leading-relaxed mb-4">
                        uni-app 是一个使用 Vue.js 开发所有前端应用的框架，开发者编写一套代码，可发布到iOS、Android、Web（响应式）、以及各种小程序等多个平台。
                    </p>
                    <div class="bg-purple-50 p-4 rounded-lg">
                        <h3 class="font-semibold text-purple-800 mb-2">
                            <i class="fas fa-lightbulb mr-2"></i>核心优势
                        </h3>
                        <ul class="space-y-2 text-sm text-gray-700">
                            <li><i class="fas fa-check text-green-500 mr-2"></i>一套代码，多端发布</li>
                            <li><i class="fas fa-check text-green-500 mr-2"></i>基于 Vue.js，学习成本低</li>
                            <li><i class="fas fa-check text-green-500 mr-2"></i>丰富的组件生态</li>
                            <li><i class="fas fa-check text-green-500 mr-2"></i>原生性能体验</li>
                        </ul>
                    </div>
                </div>
                <div class="flex items-center justify-center">
                    <div class="mermaid">
                        graph TD
                        A[uni-app 代码] --> B[iOS App]
                        A --> C[Android App]
                        A --> D[H5 网页]
                        A --> E[微信小程序]
                        A --> F[支付宝小程序]
                        A --> G[其他平台...]
                        style A fill:#667eea,stroke:#fff,stroke-width:2px,color:#fff
                        style B fill:#f093fb,stroke:#fff,stroke-width:2px,color:#fff
                        style C fill:#f093fb,stroke:#fff,stroke-width:2px,color:#fff
                        style D fill:#f093fb,stroke:#fff,stroke-width:2px,color:#fff
                        style E fill:#f093fb,stroke:#fff,stroke-width:2px,color:#fff
                        style F fill:#f093fb,stroke:#fff,stroke-width:2px,color:#fff
                        style G fill:#f093fb,stroke:#fff,stroke-width:2px,color:#fff
                    </div>
                </div>
            </div>
        </div>

        <!-- Environment Setup -->
        <div class="content-card rounded-2xl shadow-xl p-8 mb-12">
            <h2 class="text-3xl font-bold mb-6 section-title">
                <i class="fas fa-cog mr-3 text-purple-600"></i>环境搭建
            </h2>
            <div class="grid md:grid-cols-3 gap-6">
                <div class="bg-gradient-to-br from-purple-50 to-pink-50 p-6 rounded-xl">
                    <div class="text-center mb-4">
                        <i class="fas fa-code text-4xl text-purple-600"></i>
                    </div>
                    <h3 class="font-semibold text-lg mb-2">HBuilderX</h3>
                    <p class="text-gray-600 text-sm mb-4">专为 uni-app 优化的开发工具</p>
                    <a href="https://www.dcloud.io/hbuilderx.html" target="_blank" class="text-purple-600 hover:text-purple-800 font-medium">
                        下载安装 <i class="fas fa-external-link-alt ml-1"></i>
                    </a>
                </div>
                <div class="bg-gradient-to-br from-green-50 to-blue-50 p-6 rounded-xl">
                    <div class="text-center mb-4">
                        <i class="fab fa-weixin text-4xl text-green-600"></i>
                    </div>
                    <h3 class="font-semibold text-lg mb-2">微信开发者工具</h3>
                    <p class="text-gray-600 text-sm mb-4">开发微信小程序必备工具</p>
                    <a href="https://developers.weixin.qq.com/miniprogram/dev/devtools/download.html" target="_blank" class="text-green-600 hover:text-green-800 font-medium">
                        下载安装 <i class="fas fa-external-link-alt ml-1"></i>
                    </a>
                </div>
                <div class="bg-gradient-to-br from-orange-50 to-red-50 p-6 rounded-xl">
                    <div class="text-center mb-4">
                        <i class="fas fa-terminal text-4xl text-orange-600"></i>
                    </div>
                    <h3 class="font-semibold text-lg mb-2">命令行工具</h3>
                    <p class="text-gray-600 text-sm mb-4">使用 Vue CLI 创建项目</p>
                    <code class="bg-gray-800 text-white px-2 py-1 rounded text-xs">npm install -g @vue/cli</code>
                </div>
            </div>
        </div>

        <!-- Key Features -->
        <div class="grid md:grid-cols-2 gap-8 mb-12">
            <div class="feature-card">
                <h3 class="text-2xl font-bold mb-4">
                    <i class="fas fa-layer-group mr-3"></i>条件编译
                </h3>
                <p class="mb-4 opacity-90">通过特殊注释，实现平台差异化功能</p>
                <div class="bg-white bg-opacity-20 rounded-lg p-4">
                    <code class="text-sm">
                        &lt;!-- #ifdef MP-WEIXIN --&gt;<br>
                        微信小程序专属代码<br>
                        &lt;!-- #endif --&gt;
                    </code>
                </div>
            </div>
            <div class="feature-card">
                <h3 class="text-2xl font-bold mb-4">
                    <i class="fas fa-puzzle-piece mr-3"></i>丰富组件
                </h3>
                <p class="mb-4 opacity-90">内置组件 + uni-ui 扩展组件库</p>
                <div class="flex flex-wrap gap-2">
                    <span class="bg-white bg-opacity-20 px-3 py-1 rounded-full text-sm">view</span>
                    <span class="bg-white bg-opacity-20 px-3 py-1 rounded-full text-sm">swiper</span>
                    <span class="bg-white bg-opacity-20 px-3 py-1 rounded-full text-sm">navigator</span>
                    <span class="bg-white bg-opacity-20 px-3 py-1 rounded-full text-sm">uni-grid</span>
                    <span class="bg-white bg-opacity-20 px-3 py-1 rounded-full text-sm">更多...</span>
                </div>
            </div>
        </div>

        <!-- Development Flow -->
        <div class="content-card rounded-2xl shadow-xl p-8 mb-12">
            <h2 class="text-3xl font-bold mb-6 section-title">
                <i class="fas fa-rocket mr-3 text-purple-600"></i>开发流程
            </h2>
            <div class="timeline">
                <div class="timeline-item">
                    <h3 class="font-semibold text-lg mb-2">1. 创建项目</h3>
                    <p class="text-gray-600">使用 HBuilderX 创建 uni-app 项目，选择合适的模板</p>
                </div>
                <div class="timeline-item">
                    <h3 class="font-semibold text-lg mb-2">2. 配置页面</h3>
                    <p class="text-gray-600">在 pages.json 中配置页面